*This file creates the excel files necessary to create Table A2

egen STATE = group(state_code)



*This first chunk produces columns 1--3
*******************************************************************************
preserve

keep if year == 1974 & e(sample)==1

balancetable Treated post offrespop has_casino has_credit using  "winters_bal_1974.xls", replace vce(cluster TOWNSHIP)

restore

preserve
 
keep if year == 1982 & e(sample)==1

balancetable Treated post offrespop has_casino has_credit using "winters_bal_1982.xls", replace vce(cluster TOWNSHIP)
restore


preserve

keep if year == 1992 & e(sample)==1

balancetable Treated post offrespop has_casino has_credit using "winters_bal_1992.xls", replace vce(cluster TOWNSHIP)

restore


preserve

keep if year == 2002 & e(sample)==1

balancetable Treated post offrespop has_casino has_credit using "winters_bal_2002.xls", replace vce(cluster TOWNSHIP)

restore


preserve

keep if year == 2012 & e(sample)==1

balancetable Treated post offrespop has_casino has_credit using "winters_bal_2012.xls", replace vce(cluster TOWNSHIP)

restore




*This chunk produces the within-state comparisons in column 4
*******************************************************************************

preserve

keep if year == 1974 & e(sample)==1

balancetable Treated post offrespop has_casino has_credit using  "winters_bal_1974_state.xls", vce(cluster TOWNSHIP) fe(STATE) replace

restore

preserve

keep if year == 1982 & e(sample)==1

balancetable Treated post offrespop has_casino has_credit using "winters_bal_1982_state.xls", vce(cluster TOWNSHIP) fe(STATE) replace

restore


preserve

keep if year == 1992 & e(sample)==1

balancetable Treated post offrespop has_casino has_credit using "winters_bal_1992_state.xls", vce(cluster TOWNSHIP) fe(STATE) replace 

restore


preserve

keep if year == 2002 & e(sample)==1

balancetable Treated post offrespop has_casino has_credit using "winters_bal_2002_state.xls", vce(cluster TOWNSHIP) fe(STATE) replace 

restore


preserve

keep if year == 2012 & e(sample)==1

balancetable Treated post offrespop has_casino has_credit using "winters_bal_2012_state.xls", vce(cluster TOWNSHIP) fe(STATE) replace

restore
